home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.42 / includes3v1 / includes3v1.lha / Resources / Disk.i < prev    next >
Text File  |  1994-12-04  |  3KB  |  109 lines

  1. {
  2.         Disk.i for PCQ Pascal
  3.  
  4.         external declarations for disc resources
  5. }
  6.  
  7. {$I   "Include:Exec/Lists.i"}
  8. {$I   "Include:Exec/Ports.i"}
  9. {$I   "Include:Exec/Interrupts.i"}
  10. {$I   "Include:Exec/Libraries.i"}
  11. {$I   "Include:Exec/Tasks.i"}
  12.  
  13.  
  14. {********************************************************************
  15. *
  16. * Resource structures
  17. *
  18. ********************************************************************}
  19.  
  20. Type
  21.  
  22.     DiscResourceUnit = record
  23.         dru_Message     : Message;
  24.         dru_DiscBlock   : Interrupt;
  25.         dru_DiscSync    : Interrupt;
  26.         dru_Index       : Interrupt;
  27.     end;
  28.     DiscResourceUnitPtr = ^DiscResourceUnit;
  29.  
  30.     DiscResource = record
  31.         dr_Library      : Library;
  32.         dr_Current      : DiscResourceUnitPtr;
  33.         dr_Flags        : Byte;
  34.         dr_pad          : Byte;
  35.         dr_SysLib       : LibraryPtr;
  36.         dr_CiaResource  : LibraryPtr;
  37.         dr_UnitID       : Array [0..3] of Integer;
  38.         dr_Waiting      : List;
  39.         dr_DiscBlock    : Interrupt;
  40.         dr_DiscSync     : Interrupt;
  41.         dr_Index        : Interrupt;
  42.         dr_CurrTask     : TaskPtr;
  43.     end;
  44.     DiscResourcePtr = ^DiscResource;
  45.  
  46. Const
  47.  
  48. { dr_Flags entries }
  49.  
  50.     DRB_ALLOC0          = 0;    { unit zero is allocated }
  51.     DRB_ALLOC1          = 1;    { unit one is allocated }
  52.     DRB_ALLOC2          = 2;    { unit two is allocated }
  53.     DRB_ALLOC3          = 3;    { unit three is allocated }
  54.     DRB_ACTIVE          = 7;    { is the disc currently busy? }
  55.  
  56.     DRF_ALLOC0          = 1;    { unit zero is allocated }
  57.     DRF_ALLOC1          = 2;    { unit one is allocated }
  58.     DRF_ALLOC2          = 4;    { unit two is allocated }
  59.     DRF_ALLOC3          = 8;    { unit three is allocated }
  60.     DRF_ACTIVE          = 128;  { is the disc currently busy? }
  61.  
  62.  
  63.  
  64. {*******************************************************************
  65. *
  66. * Hardware Magic
  67. *
  68. *******************************************************************}
  69.  
  70.  
  71.     DSKDMAOFF           = $4000;        { idle command for dsklen register }
  72.  
  73.  
  74. {*******************************************************************
  75. *
  76. * Resource specific commands
  77. *
  78. *******************************************************************}
  79.  
  80. {
  81.  * DISKNAME is a generic macro to get the name of the resource.
  82.  * This way if the name is ever changed you will pick up the
  83.  *  change automatically.
  84.  }
  85.  
  86.     DISKNAME            = "disk.resource";
  87.  
  88.  
  89.     DR_ALLOCUNIT        = LIB_BASE - 0 * LIB_VECTSIZE;
  90.     DR_FREEUNIT         = LIB_BASE - 1 * LIB_VECTSIZE;
  91.     DR_GETUNIT          = LIB_BASE - 2 * LIB_VECTSIZE;
  92.     DR_GIVEUNIT         = LIB_BASE - 3 * LIB_VECTSIZE;
  93.     DR_GETUNITID        = LIB_BASE - 4 * LIB_VECTSIZE;
  94.  
  95.  
  96.     DR_LASTCOMM         = DR_GIVEUNIT;
  97.  
  98. {*******************************************************************
  99. *
  100. * drive types
  101. *
  102. *******************************************************************}
  103.  
  104.     DRT_AMIGA           = $00000000;
  105.     DRT_37422D2S        = $55555555;
  106.     DRT_EMPTY           = $FFFFFFFF;
  107.     DRT_150RPM          = $AAAAAAAA;
  108.  
  109.